package com.is.util;

import java.util.*;
import java.text.*;
public class DateTime {
	//获取当前日期
	public static String DetailTime(){
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
		Date currentTime = new Date();
		String str_date1 = formatter.format(currentTime); 
		String str_date2 = str_date1.toString();
		return str_date2;
	}
	
	public static String SimpleDate(){
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); 
		Date currentTime = new Date();
		String str_date1 = formatter.format(currentTime); 
		String str_date2 = str_date1.toString();
		return str_date2;
	}
	
	
	public static int getYear(){
		Calendar calendar = new GregorianCalendar();
		calendar.setTime(new Date());
		return calendar.get(Calendar.YEAR);
	}
	
	public static int dateToInt(){
	    return Integer.parseInt((DateTime.SimpleDate().replace("-", "")).toString());
	}
	
	public static void main(String args[]) {
		System.out.println(dateToInt()+1);
		
	}
}
